package com.swxc.smartorder.entity

import android.annotation.SuppressLint
import android.os.Parcelable
import com.google.gson.annotations.SerializedName
import kotlinx.android.parcel.Parcelize


/**
 * tokenData
 */
data class TokenData(
        @SerializedName("access_token") val accessToken: String,
        @SerializedName("expires_in") val expiresIn: Int,
        @SerializedName("refresh_token") val refreshToken: String,
        @SerializedName("token_type") val tokenType: String
)


/**
 * 工单列表 Item
 */
data class OrderBean(
        @SerializedName("createTime") val createTime: Long,
        @SerializedName("id") val id: Long,
        @SerializedName("priorityLevel") val priorityLevel: String,
        @SerializedName("status") val status: String,
        @SerializedName("timeout") val timeout: Boolean,
        @SerializedName("title") val title: String
)


/**
 * 工单详情
 */
data class OrderDetailEntity(
        @SerializedName("acceptView") val acceptView: Boolean,
        @SerializedName("detail") val detail: Detail,
        @SerializedName("houseAddress") val houseAddress: String,
        @SerializedName("record") val record: List<Record>
)

data class Detail(
        @SerializedName("accept") val accept: String,
        @SerializedName("categoryId") val categoryId: Int,
        @SerializedName("categoryName") val categoryName: String,
        @SerializedName("consignee") val consignee: String,
        @SerializedName("contactNumber") val contactNumber: String,
        @SerializedName("content") val content: String,
        @SerializedName("createTime") val createTime: Long,
        @SerializedName("createdBy") val createdBy: Int,
        @SerializedName("dataSource") val dataSource: String,
        @SerializedName("distribution") val distribution: String,
        @SerializedName("id") val id: Int,
        @SerializedName("images") val images: List<ImageEntity>,
        @SerializedName("launcherId") val launcherId: Long,
        @SerializedName("launcherMobile") val launcherMobile: String,
        @SerializedName("launcherName") val launcherName: String,
        @SerializedName("number") val number: String,
        @SerializedName("operatorType") val operatorType: String,
        @SerializedName("orgId") val orgId: Int,
        @SerializedName("orgName") val orgName: String,
        @SerializedName("priorityLevel") val priorityLevel: String,
        @SerializedName("receivingAddress") val receivingAddress: String,
        @SerializedName("staffId") val staffId: Long,
        @SerializedName("staffName") val staffName: String,
        @SerializedName("status") val status: String,
        @SerializedName("timeout") val timeout: Boolean,
        @SerializedName("title") val title: String,
        @SerializedName("updateTime") val updateTime: Long
)

data class Record(
        @SerializedName("content") val content: String,
        @SerializedName("createTime") val createTime: Long,
        @SerializedName("customerId") val customerId: Long,
        @SerializedName("headImage") val headImage: String,
        @SerializedName("id") val id: Int,
        @SerializedName("images") val images: List<ImageEntity>,
        @SerializedName("operatorType") val operatorType: String,
        @SerializedName("serviceType") val serviceType: String,
        @SerializedName("staffId") val staffId: Long,
        @SerializedName("staffName") val staffName: String,
        @SerializedName("workOrderId") val workOrderId: Int
)

@SuppressLint("ParcelCreator")
@Parcelize
data class ImageEntity(val accessUrl: String, val fileId: Int, val thumbImageURL: String) : Parcelable


/**
 * 用户信息
 */
data class UserEntity(
        @SerializedName("avatar") val avatar: String,
        @SerializedName("companyId") val companyId: Long,
        @SerializedName("name") val name: String,
        @SerializedName("orgId") val orgId: Long,
        @SerializedName("organization") val organization: String,
        @SerializedName("permissions") val permissions: List<String>,
        @SerializedName("phone") val phone: String,
        @SerializedName("pushTags") val pushTags: String,
        @SerializedName("seatNumber") val seatNumber: Any,
        @SerializedName("staffId") val staffId: Long,
        @SerializedName("systemAdmin") val systemAdmin: Boolean
)


data class ContactEntity(
        @SerializedName("avatar") val avatar: String,
        @SerializedName("orgName") val orgName: String,
        @SerializedName("staffId") val staffId: Long,
        @SerializedName("staffName") val staffName: String,
        @SerializedName("staffPhone") val staffPhone: String
)


/**
 * 修改头像 返回Bean
 */
data class ModifyAvatar(
        @SerializedName("headImage") val headImage: String
)


data class TagAliasBean(
        var action: Int = 0,
        var tags: Set<String>? = null,
        var alias: String = "",
        var isAliasAction: Boolean = false
)